﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="MessageList.aspx.cs" Inherits="CARMS.Message.MessageList" %>
<%@ Import Namespace="CARMSBusiness.InterFace"%>
<%@ Register Src="~/Controls/GridPager.ascx" TagName="GridPager" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <vs:GridView ID="gridList" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                OnRowDataBound="gridList_RowDataBound" OnRowCommand="gridList_OnRowCommand">
                <Columns>
                    <vs:TemplateField HeaderText="Report ID" ItemStyle-Width="150px" SortExpression="RegistrationNumber">
                        <ItemTemplate>
                            <div style="width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
                                title="<%# Eval("G1001")%>">
                                <asp:HyperLink runat="server" Text='<%# Eval("G1001")%>' Target="_top"  ></asp:HyperLink>
                            </div>
                        </ItemTemplate>
                    </vs:TemplateField>
                    <vs:TemplateField HeaderText="Subject" ItemStyle-Width="160px">
                        <ItemTemplate>
                            <div style="width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
                                title='<%#Eval("G1001")%>'>
                         <%#Eval("G1001")%>
                            </div>
                        </ItemTemplate>
                    </vs:TemplateField>
                    <vs:TemplateField HeaderText="Create Date" ItemStyle-Width="130px">
                        <ItemTemplate>
                            <div style="width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
                                title='<%#((DateTime)Eval("CreateDate")).ToString(ApplicationConfiguration.DateTimeFormat)%>'>
                                <%#((DateTime)Eval("CreateDate")).ToString(ApplicationConfiguration.DateTimeFormat)%>
                            </div>
                        </ItemTemplate>
                    </vs:TemplateField>
                    <vs:TemplateField HeaderText="Operation" ItemStyle-Width="120px">
                        <ItemTemplate>
                            <asp:HyperLink runat="server" ID="linkPickUp" Text="Pick Up" CommandName="PickUp"
                                CommandArgument='<%#Eval("GID") %>' />
                         </ItemTemplate>
                    </vs:TemplateField>
                </Columns>
            </vs:GridView>
            <uc1:GridPager ID="PageQueryAdapter1" runat="server" TargetControlID="gridList" PageSize="20"
                OnPerformGetCondition="PageQueryAdapter1_PerformGetCondition" OnPerformGetRecordCount="PageQueryAdapter1_PerformGetRecordCount"
                OnPerformGetPageData="PageQueryAdapter1_PerformGetPageData" />
</asp:Content>
